package cn.bincker.mycaptcha.slider.entity;

import cn.bincker.mycaptcha.basic.entity.MyCaptcha;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class SliderCaptcha implements MyCaptcha, Cloneable {
    private String image;
    private String slider;
    private Integer y;

    public SliderCaptcha(String image, String slider, Integer y) {
        this.image = image;
        this.slider = slider;
        this.y = y;
    }

    @Override
    public SliderCaptcha clone() {
        try {
            var clone = (SliderCaptcha) super.clone();
            clone.image = image;
            clone.slider = slider;
            clone.y = y;
            return clone;
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}
